package test;

public class BankPay implements Pay {
        private double m = 100.0;
        public void pay(double money) {
            if (m >= money) {
                System.out.println("银行卡支付" + money + "元");
                m = m-money;
                System.out.println("支付成功！当前余额为：" + m);
            } else {
                System.out.println("余额不足");
            }
        }
        public double getBalance() {
            return m;
        }
    }

